package lab04.test05;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by MECHREV on 2017/12/21.
 */
public class test03
{
    public static void main(String[] args) {
        //正则表达式
        Matcher matcher = Pattern.compile("java(\\d+)级信本2班(\\d+)张三")
                .matcher("面对程序设计java2016级信本2班16061010223张三作业一.docx");
        while(matcher.find()){
            System.out.println(matcher.group(1));
            System.out.println(matcher.group(2));
        }
    }
}
